package com.itheima.hw.test4;

public abstract class Animal {

    private int age;

    public Animal() {
    }

    public Animal(int age) {
        this.age = age;
    }


    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }


    public void drink(){
        System.out.println("喝水");
    }

    public abstract void eat();


    @Override
    public String toString() {
        return "Animal{" +
                "age=" + age +
                '}';
    }
}
